package com.erastep.util
{
	public class MessageConstants
	{
		/**
		 * 增加
		 * */
		public static const TYPE_ADD:String = "add";
		/**
		 * 编辑
		 * */
		public static const TYPE_UPDATE:String = "update";
		/**
		 * 删除
		 * */
		public static const TYPE_DELETE:String = "delete";
		/**
		 * 查找
		 * */
		public static const TYPE_SEARCH:String = "search";
		
		/**
		 * 成功
		 * */
		public static const TYPE_SUCCESS:String = "success";
		
		/**
		 * 插件打开类型1
		 * */
		public static const TYPE_1:String = "1";
		
		/**
		 * 插件打开类型2
		 * */
		public static const TYPE_2:String = "2";
		
		/**
		 * 插件打开类型3
		 * */
		public static const TYPE_3:String = "3";
		
		/**
		 * 数据格式delta
		 * */
		public static const TYPE_DELTA:String = "delta";
		
		/**
		 * 数据格式json
		 * */
		public static const TYPE_JSON:String = "json";
		
		/**
		 * 失败
		 * */
		public static const TYPE_FAIL:String = "fail";
		
		/**
		 * 访问服务器失败
		 * */
		public static const CALL_SERVER_ERROR:String = "callServerError";
		
		/**
		 * 加载插件数据
		 * */
		public static const LOAD_PLUGIN_LIST:String = "loadPluginList";
		
		/**
		 * 打开一个新的窗口
		 * @param view   视图
		 * @param width  显示宽度
		 * @param height 显示高度
		 * @param title  窗口标题
		 * @param windowId 窗口ID
		 * */
		public static const NEW_WINDOW:String = "newWindow";
		
		/**
		 * 关闭窗口消息
		 * */
		public static const CLOSE_WINDOW:String = "closeWindow";
		
		/**
		 * 插件控制另一个插件初始化
		 * */
		public static const INSTANCE_PLUGIN:String = "instancePlugin";
		
		/**
		 * get dataStore message 
		 * */
		public static const GET_DATASTORE:String = "getDataStore";
		
		/**
		 * External module message
		 * */
		public static const LOAD_DATASTORE:String = "loadDataStore";
		
		public static const LOAD_DATASTORE_SUCCESS:String = "loadDataStoreSuccess";
		
		/**
		 * get program message
		 * */
		public static const GET_PROGRAM:String = "getProgram"
			
	    /**
		 * get Privilege button
		 * */
		public static const GET_PRIVILEGESBTN:String = "getPrivilegeBtn";
			
		/**
		 * return dataStore to module
		 * */
		public static const RETURN_DATASTORE:String = "returnDataStore";
		
		/**
		 * get link fields
		 * */
		public static const GET_LINK_FIELDS:String = "getLinkDataFields";
		
		/**
		 * save data
		 * */
		public static const SAVE_DATASTORE:String = "saveDataMsg";
		
		/**
		 * link Event
		 * */
		public static const LINKEVENT:String = "linkEvent";
		
		/**
		 * Print
		 * */
		public static const PRINTEVENT:String = "printEvent";
		
		/**
		 * model link
		 * */
		public static const MODELLINKEVENT:String = "modelLinkEvent";
		
		//check the window have opend
		//public static const CHECK_WINDOW:String = "checkWindow";
		
		//check the window success
		//public static const CHECK_WINDOW_SUCCESS:String = "checkWinSuccess";
		
		
		public static const RETURN_SAVE_DATASTORE:String = "returnSaveDataStore";
		
		
		/***********************************数据通道改进后,消息名 开始定义***********************************************/
		/**
		 * ajax 数据返回成功后发送的消息
		 * jsLoadDataHandler
		 * */
		public static const JS_AJAX_LOADDATA:String = "jsLoadDataHandler";
		
		/**
		 * 到后台加载数据
		 * @param body Object 参数结构 {systemId:String,formId:String,modelParams:{},modelWheres:{},datasetIds:"2005,2007",callBack:String} 新参数结构
		 * */
		public static const LOAD_DATA_BY_MODEL:String = "loadDataByModel";
		/**
		 * 数据引用
		 * loadLinkData 
		 * @param body Object 参数结构 {systemId:String,formId:String,dataChannelId:String,datasetId:String,rowId:String,currentRowData:Object,masterName:String}
		 * */
		public static const LOAD_LINK_DATA:String = "loadLinkData";
		
		/**
		 * 刷新数据
		 * */
		public static const REFRESH_DATA:String = "refreshData";
		
		/**
		 * 读取所有数据
		 * */
		public static const READ_ALL_DATA:String = "readAllData";
		
		/**
		 * 读取某页数据
		 * */
		public static const READ_PAGE_DATA:String = "readPageData";
		
		/**
		 * 修改，删除，编辑数据
		 * */
		public static const CHANGE_DATA:String = "changeData";
		
		/**
		 * 重置数据
		 * */
		public static const RESET_DATA:String = "resetData";
		
		/**
		 * 保存数据
		 * 参数结构 {dataChannelId:String,callBack:String}
		 * */
		public static const SAVE_DATA:String = "saveData";
		
		/**
		 * 打印报表
		 * */
		public static const PRINT_REPORT:String = "printReport";
		
		/**
		 * 主从数据集
		 * */
		public static const MASTER_SLAVE_DATA:String = "masterSlaveData";
		
		/**
		 * 主从数据集条件查询
		 * */
		public static const MASTER_SLAVE_DATA_BY_CONDITION:String = "masterSlaveBySlaveConditionData";
		
		/**
		 * 获取外表链接
		 * */
		public static const GET_DATA_LINK:String = "getDataLink";
		
		/**
		 * 返回链接数据
		 * */
		public static const RETURN_DATA_LINK:String = "returnDataLink";
		
		/**
		 * 保存外表链接数据
		 * */
		public static const PRE_SAVE_CONDITION:String = "preSaveCondition";
		/***********************************数据通道改进后,消息名 接受定义***********************************************/
		
		/**
		 * 自定义消息
		 * */
		public static const MESSAGE_TO_ACTION:String = "messageToAction";
		
		/**
		 * 获取用户信息
		 * */
		public static const GET_USER_INFO:String = "getUserInfo";
		
		/**
		 * 获取当前用户数量
		 * */
		public static const GET_ONLINE_USERS:String = "getOnlineUsers";
		
		/**
		 * 发送自定义Action
		 * 参数结构{url:String,callBack:String,param:{aaa:String,bbb:String}}
		 * */
		public static const CUSTOM_ACTION:String = "customAction";
		
		/**
		 * 弹出一个新的窗口
		 * 参数结构 {title:String,view:displayObject,width:int,height:int,closeFun:Function,windowId:String,align:String,textAlign:String,modal:Boolean}
		 * align  center 代表居中 默认状态  left 窗口右上角
		 * modal  true 模态窗口 默认状态  false 没有覆盖层
		 * textAlign  center 标题居中 left 标题居左默认  right 标题居右
		 * */
		public static const POPUP_WINDOW:String = "popupWindow";
		
		/**
		 * 关闭弹出窗口
		 * 参数结构 String titleWindowId
		 * */
		public static const REMOVE_POPUP_WINDOW:String = "removePopupWindow";
		
		/**
		 * 链接到其他表单,打开其它插件
		 * 参数结构 {systemId:String,formId:String,openType:String,whereParams:Object,injectParams:Object}
		 * */
		public static const LINK_OTHER_MODULE:String = "loadLinkModule";
		
		/**
		 * 显示potal信息
		 * */
		public static const SHOW_NEW_POTAL:String = "showNewPotal";
		
		/**
		 * 获取主档值 
		 * 参数结构 {masterName:String,getStruct:String,getData:String,whereStr:String,callBack:String}
		 * */
		public static const GET_MASTER_VALUE:String = "getMasterValueData";
		
		/**
		 * 获取主档属性
		 * 参数结构  {masterName:String,getStruct:String,getData:String,whereStr:String,callBack:String}
		 * */
		public static const GET_MASTER_ATTRIBUTE:String = "getMasterAttribute";
		
		/**
		 * 获取主档类型
		 * 参数结构 {rowid:String,masterName:String,callBack:String}
		 * */
		public static const GET_MASTER_TYPE:String = "getMasterType";
		
		/**
		 * 通过消息关闭tab
		 * 参数机构 String windowId
		 * */
		public static const CLOSE_TAB_BY_ID:String = "closeTabById";
		
		/**
		 * 显示主页
		 * */		
		public static const SHOW_HOME_PAGE:String = "showHomePage";
		
		/**
		 * 显示未登录主页
		 * */		
		public static const SHOW_NOLOGIN_HOME_PAGE:String = "ShowNoLoginHomePage";
		/**
		 * 显示清单
		 * */
		public static const LOAD_DOC_LIST:String = "loadDocList";
		
		/**
		 * 自定义消息类型
		 * */
		public static const INVOKE_MESSAGE:String = "invokeMessage";
	}
}